<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="initial-scale=1.0, user-scalable=no, width=device-width">
    <title>系统默认信息窗体展示</title>
    <link rel="stylesheet" href="http://cache.amap.com/lbs/static/main.css?v=1.0"/>
    <script type="text/javascript"
            src="http://webapi.amap.com/maps?v=1.3&key=您申请的key值"></script>
    <style type="text/css">
        body {
            font-size: 12px;
        }
        #tip {
            position: absolute;
            right: 5px;
            bottom: 20px;
            background-color: #fff;
            padding: 6px;
            border: solid 1px silver;
            border-radius: 3px;
            box-shadow: 3px 4px 3px 0px silver;
        }
        #tip input[type='button'] {
            float: left;
            padding: 6px;
            color: #09f;
            border: solid 1px #09f;
            background-color: #fff;
            margin: 3px 9px;
            cursor: pointer;
            border-radius: 3px;
        }
        div img{
            margin: 3px;
        }
    </style>
</head>
<body>
<div id="mapContainer"></div>
<div id="tip">
    <div>
        <input type="button" value="打开信息窗体" onClick="javascript:openInfo()"/>
        <input type="button" value="关闭信息窗体" onClick="javascript:infoWindow.close()"/>
    </div>
</div>
<script type="text/javascript">
    var infoWindow;
    //初始化地图对象，加载地图
    var map = new AMap.Map("mapContainer", {
        resizeEnable: true,
        zoom: 13,
        center:[116.480983, 39.989628]
    });

    //在指定位置打开信息窗体
    function openInfo() {
        //构建信息窗体中显示的内容
        var info = [];
        info.push("<div><img src=\" http://webapi.amap.com/images/autonavi.png \"/> ");
        info.push("<div style=\"padding:0px 0px 0px 4px;\"><b>高德软件有限公司</b>");
        info.push("电话 : 010-84107000   邮编 : 100102");
        info.push("地址 : 朝阳区阜通东大街方恒国际中心A座</div></div>");

        infoWindow = new AMap.InfoWindow({
            content: info.join("<br/>")  //使用默认信息窗体框样式，显示信息内容
        });
        infoWindow.open(map, [116.480983, 39.989628]);
    }
    openInfo();
</script>
</body>
</html>